package com.cristina.attention.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cristina.attention.entity.GroupMember;
import com.cristina.attention.entity.vo.GroupMemberVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author by Attention
 * @Classname GroupMemberMapper
 * @Date 2021/12/6
 */
public interface GroupMemberMapper extends BaseMapper<GroupMember> {

    /**
     * 根据群id 获取群成员
     *
     * @param groupId
     * @param userId
     * @return
     */
    List<GroupMember> findGroupMemberExcludeUserId(@Param("groupId") Long groupId, @Param("userId") Long userId);

    /**
     * 根据群id 获取群成员
     *
     * @param groupIds
     * @return
     */
    List<GroupMember> findGroupMemberByGroupId(@Param("groupIds") Set<Long> groupIds);

}
